package net.xju_springJdbc17_18.service.impl;

import net.xju_springJdbc17_18.dao.StuDao;
import net.xju_springJdbc17_18.entity.Stu;
import net.xju_springJdbc17_18.service.StuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.FileNotFoundException;
import java.util.Collections;
import java.util.List;

@Service
public class StuServiceImpl implements StuService {

    @Autowired
    private StuDao stuDao;

    @Override
    public List<Stu> selectAll() {
        return stuDao.selectAll();
    }

    @Override
    public void insert(Stu stu) {
        stuDao.insertStu(stu);
    }

    @Override
    public void update(Stu stu) throws FileNotFoundException {
        stuDao.updateStu(stu);
    }
}
